import json

class Tools:
    def __init__(self):
        # self.ProvinceData = {}
        self.SelectProvince = None
        self.City = list()
        self.Province = list()
    def InitSettings(self):
        DataProvince = None
        #预加载province数据
        with open("FerpaApp/config/province.json", 'r', encoding='utf-8') as f:
            DataProvince = json.load(f)
        for item in DataProvince:
            # self.ProvinceData[item['id']] = [item['province'], item['cities']]
            self.Province.append([item['id']-1, item['province']])
            self.City.append(item['cities'])